package com.langfeiyes.pattern.observer.demo;

public class App {
    public static void main(String[] args) {
        //观察者(订阅者)
        ConcreteObserver ob = new ConcreteObserver();

        //目标对象(被观察者)
        ConcreteSubject sb = new ConcreteSubject();
        sb.attach(ob);
        sb.changeState("B状态");
    }
}
